#include "cpu/exec/template-start.h"

//0xc9
make_helper(leave) {
    // 用ebp替换esp
    cpu.esp = cpu.ebp;
    // 用栈中的数据替换ebp
    cpu.ebp = swaddr_read(cpu.esp, 4);
    cpu.esp += 4;
    print_asm("leave");
    return 1;
}

#include "cpu/exec/template-end.h"